﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using DevExpress.Xpo.Helpers;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    [Persistent("TopHotel")]
    public class TopHotel : BaseObject
    {
        //begin
        public TopHotel()
        {}
        public TopHotel(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        private string _Hid;
        public string Hid
        {
            get
            {
                return _Hid;
            }
            set
            {
                SetPropertyValue("Hid", ref _Hid, value);
            }
        }
        private string _Name;
        public string Name
        {
            get
            {
                return _Name;
            }
            set
            {
                SetPropertyValue("Name", ref _Name, value);
            }
        }
        private string _Country;
        public string Country
        {
            get
            {
                return _Country;
            }
            set
            {
                SetPropertyValue("Country", ref _Country, value);
            }
        }
        private long _Province;
        public long Province
        {
            get
            {
                return _Province;
            }
            set
            {
                SetPropertyValue("Province", ref _Province, value);
            }
        }
        private long _City;
        public long City
        {
            get
            {
                return _City;
            }
            set
            {
                SetPropertyValue("City", ref _City, value);
            }
        }
        private long _District;
        public long District
        {
            get
            {
                return _District;
            }
            set
            {
                SetPropertyValue("District", ref _District, value);
            }
        }
        private string _CountryStr;
        public string CountryStr
        {
            get
            {
                return _CountryStr;
            }
            set
            {
                SetPropertyValue("CountryStr", ref _CountryStr, value);
            }
        }
        private string _ProvinceStr;
        public string ProvinceStr
        {
            get
            {
                return _ProvinceStr;
            }
            set
            {
                SetPropertyValue("ProvinceStr", ref _ProvinceStr, value);
            }
        }
        private string _CityStr;
        public string CityStr
        {
            get
            {
                return _CityStr;
            }
            set
            {
                SetPropertyValue("CityStr", ref _CityStr, value);
            }
        }
        private string _DistrictStr;
        public string DistrictStr
        {
            get
            {
                return _DistrictStr;
            }
            set
            {
                SetPropertyValue("DistrictStr", ref _DistrictStr, value);
            }
        }
        private string _Address;
        public string Address
        {
            get
            {
                return _Address;
            }
            set
            {
                SetPropertyValue("Address", ref _Address, value);
            }
        }
        private string _Level;
        public string Level
        {
            get
            {
                return _Level;
            }
            set
            {
                SetPropertyValue("Level", ref _Level, value);
            }
        }
        private string _Orientation;
        public string Orientation
        {
            get
            {
                return _Orientation;
            }
            set
            {
                SetPropertyValue("Orientation", ref _Orientation, value);
            }
        }
        private string _Tel;
        public string Tel
        {
            get
            {
                return _Tel;
            }
            set
            {
                SetPropertyValue("Tel", ref _Tel, value);
            }
        }
        private string _OpeningTime;
        public string OpeningTime
        {
            get
            {
                return _OpeningTime;
            }
            set
            {
                SetPropertyValue("OpeningTime", ref _OpeningTime, value);
            }
        }
        private string _DecorateTime;
        public string DecorateTime
        {
            get
            {
                return _DecorateTime;
            }
            set
            {
                SetPropertyValue("DecorateTime", ref _DecorateTime, value);
            }
        }
        private long _Storeys;
        public long Storeys
        {
            get
            {
                return _Storeys;
            }
            set
            {
                SetPropertyValue("Storeys", ref _Storeys, value);
            }
        }
        private long _Rooms;
        public long Rooms
        {
            get
            {
                return _Rooms;
            }
            set
            {
                SetPropertyValue("Rooms", ref _Rooms, value);
            }
        }
        private string _Desc;
        [Size(SizeAttribute.Unlimited)]
        public string Desc
        {
            get
            {
                return _Desc;
            }
            set
            {
                SetPropertyValue("Desc", ref _Desc, value);
            }
        }
        private string _Service;
        public string Service
        {
            get
            {
                return _Service;
            }
            set
            {
                SetPropertyValue("Service", ref _Service, value);
            }
        }
        private string _PicUrl;
        public string PicUrl
        {
            get
            {
                return _PicUrl;
            }
            set
            {
                SetPropertyValue("PicUrl", ref _PicUrl, value);
            }
        }
        private DateTime _Created;
        public DateTime Created
        {
            get
            {
                return _Created;
            }
            set
            {
                SetPropertyValue("Created", ref _Created, value);
            }
        }
        private DateTime _Modified;
        public DateTime Modified
        {
            get
            {
                return _Modified;
            }
            set
            {
                SetPropertyValue("Modified", ref _Modified, value);
            }
        }
        private long _Status;
        public long Status
        {
            get
            {
                return _Status;
            }
            set
            {
                SetPropertyValue("Status", ref _Status, value);
            }
        }
        [Association("TopHotelRoomTypes", typeof(TopRoomType)), Aggregated]
        public XPCollection<TopRoomType> RoomTypes
        {
            get
            {
                return GetCollection<TopRoomType>("RoomTypes");
            }
        }
        private string _AliasName;
        public string AliasName
        {
            get
            {
                return _AliasName;
            }
            set
            {
                SetPropertyValue("AliasName", ref _AliasName, value);
            }
        }
        private TopRoom _TopRoom;
        public TopRoom Room
        {
            get
            {
                return _TopRoom;
            }
            set
            {
                SetPropertyValue("TopRoom", ref _TopRoom, value);
            }
        }
        //end

    }
}
